<?php

namespace app\dao\system;

use app\dao\BaseDao;
use app\model\system\SystemAdmin;

/**
 * Class SystemAdmin
 * @package app\dao\system
 */
class SystemAdminDao extends BaseDao
{
    /**
     * 设置模型
     * @return string
     */
    protected function setModel(): string
    {
        return SystemAdmin::class;
    }

    /**
     * Description:
     *
     * @param array $where
     * @param int   $page
     * @param int   $limit
     *
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getList(array $where, int $page, int $limit)
    {
        return $this->search($where)->page($page, $limit)->order('id desc')->select()->toArray();
    }
}

